<style>
.fui-tab-scroll .item {
    font-size: 0.85rem;
}
</style>
<div class="fui-page">
	<div class="fui-content">
		<div class="fui-tab-scroll" style="margin-top:0.4rem;padding-left:0.5rem">
			<div ng-class="{'item':1,'on':pagedata.params.type==1}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.params.type=1;tool.get_list('jy_ailiao/quan/getquanlog/',true);">附近</a></div>
			<div ng-class="{'item':1,'on':pagedata.params.type==2}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.params.type=2;tool.get_list('jy_ailiao/quan/getquanlog/',true);">关注</a></div>
			<div ng-class="{'item':1,'on':pagedata.params.type==5}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.params.type=5;tool.get_list('jy_ailiao/quan/getquanlog/',true);">热推</a></div>
		</div>
		<div ng-include="sys_html('common/_quanlist')"></div>
		<div ng-include="sys_html('common/_copyright',true)"></div>
	</div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<div ng-include="sys_html('common/_videocall')"></div>
<div ng-include="sys_html('common/_gotop',true)"></div>
<!--弹目-->
<div ng-if="pagedata.showtanmus && !pagedata.pluginset.no_tanmu" class="video-sms-pane {{pagedata.transition?'transition':''}}">
		<div class="video-sms-text">
			<image class="video-sms-logo" ng-src="{{pagedata.tanmus[pagedata.nowmsgid].avatar}}"/>
			<span class="overflow-h"> 最新动态来自 {{pagedata.tanmus[pagedata.nowmsgid].nickname}}</span>
		</div>
</div>
<div class="fe-floatright-bottom" style="bottom:3rem">
	<div class="icon" style="border-radius: 2.5rem;background-color: {{main.syscolor || '#63BE72'}};width:2.5rem;height:2.5rem" href="javascript:;" ng-click="access_json('jy_ailiao/upitem/')">
		<i class="icon icon-lvyoutehui" style="color:#fff;font-size:1.2rem;line-height:2.5rem"></i>
	</div>
</div>
<script type="text/javascript">
scope.pagedata.post={'sendtype':1,'dayid':0}
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_ailiao/quan/getquanlog/');
}
scope.tool.get_list('jy_ailiao/quan/getquanlog/',true);
</script>
<script>
scope.pagedata.issocketmsg=false;
scope.pagedata.tanmuspage=0;
scope.pagedata.nowmsgid=0;
scope.pagedata.gettanmus=function() {
	if(!scope.pagedata.issocketmsg){
			scope.get('jy_ailiao/get_data/gettanmus/page='+scope.pagedata.tanmuspage,function(res){
						//console.log(res);
						scope.pagedata.tanmus=res.list
						if(scope.pagedata.tanmus.length>0){
							scope.pagedata.tanmuspage++;
							scope.pagedata.up_oldtanmu();
						}
			});
	}
}
//刚进入时；如果没有新订单消息，就弹储备订单消息
if(scope.pagedata.pluginset.no_tanmu!=1){
		setTimeout(function(){
			scope.pagedata.gettanmus();
		},2000);
}
scope.pagedata.up_oldtanmu=function() {
		if(scope.page.action=='quan'){
			var i=scope.pagedata.nowmsgid;
			if(i<scope.pagedata.tanmus.length){
				set_tanmu(scope.pagedata.tanmus[i].nickname,scope.pagedata.tanmus[i].avatar,scope.pagedata.tanmus[i].time);
			}else{
				scope.pagedata.gettanmus();
			}
		}else{
			return false;
		}
}
function set_tanmu(nickname,avatar,time) {
		scope.pagedata.nowmsgid++
		scope.pagedata.showtanmus=true
		scope.$evalAsync(scope.pagedata.showtanmus);
		setTimeout(function(){
			scope.pagedata.transition=true
			scope.$evalAsync(scope.pagedata.transition);	
		},300);
		setTimeout(function(){
			scope.pagedata.showtanmus=false
			scope.pagedata.transition=false
			scope.$evalAsync(scope.pagedata.showtanmus);	
		},2000);
		setTimeout(function(){
			//等待5秒，如果没有新的订单消息，就弹储备订单消息
			scope.pagedata.issocketmsg=scope.pagedata.issocketmsg?scope.pagedata.issocketmsg:false;
			if(!scope.pagedata.issocketmsg && scope.page.action=='index'){
				scope.pagedata.up_oldtanmu();
			}
		},4000);
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>
